import java.util.Scanner;

public class InitCalcu {
    public static void main(String[] args) {
        Calculator calculator=new Calculator();
        Scanner in=new Scanner(System.in);
        double result=0.0;
        System.out.print("请输入第一个操作数:");
        calculator.numberA=in.nextDouble();
        System.out.print("请输入运算符(+、-、*、/):");
        String  ch=in.next();
        System.out.print("请输入第一个操作数:");
        calculator.numberB=in.nextDouble();
        switch (ch){
            case "+":
                result=calculator.plus(calculator.numberA,calculator.numberB);
                break;
            case "-":
                result=calculator.minus(calculator.numberA,calculator.numberB);
                break;
            case "*":
                result=calculator.multiplyBy(calculator.numberA,calculator.numberB);
                break;
            case "/":
                result=calculator.divide(calculator.numberA,calculator.numberB);
                break;
                default:
                    System.out.println("你输入的运算符不正确!");
        }
        System.out.println(calculator.numberA+ch+calculator.numberB+"="+result);
    }
}
